package com.google.code.virtualhockey.vhx.shared.error;

/**
 * Signals that the connecting user is not authenticated.
 */
public class WebNotAuthenticatedException extends WebSecurityException
{
  /** URL of the login page. */
  private String m_strLoginRedirectUrl;

  /** Argumentless default constructor for GWT/RPC. */
  private WebNotAuthenticatedException()
  {
  }

  /**
   * Creates a new WebNotAuthenticatedException.
   *
   * @param strMessage an exception message
   * @param strLoginRedirectUrl a URL to redirect the user to the login page
   * @see WebServerException
   */
  public WebNotAuthenticatedException( String strMessage, String strLoginRedirectUrl )
  {
    super( strMessage );
    m_strLoginRedirectUrl = strLoginRedirectUrl;
  }

  /**
   * Returns the URL which allows the connected user to login.
   */
  public String getLoginRedirectUrl()
  {
    return m_strLoginRedirectUrl;
  }
}
